why main method is public in java